/*****************************************************************************

File:   SurfaceDescsInterfaceImport.java

Date          Build     Author        Version    Comments
27-Dec-12    P-20-20    dshah          $$1        Created

****************************************************************************/
package com.ptc.otkjavaexamples;
import com.ptc.pfc.pfcGeometry.*;
import com.ptc.cipjava.*;
import com.ptc.pfc.pfcSession.*;
import com.ptc.pfc.pfcCommand.*;
import com.ptc.pfc.pfcGlobal.*;
import com.ptc.pfc.pfcModel.*;
import com.ptc.pfc.pfcModelItem.*;
import com.ptc.pfc.pfcFeature.*;
import com.ptc.pfc.pfcSolid.*;
import java.io.*;

import com.ptc.pfc.pfcFamily.*;
import com.ptc.pfc.pfcServer.*;
import com.ptc.pfc.pfcWindow.*;
import com.ptc.wfc.wfcSolid.*;
import com.ptc.pfc.pfcBase.*;
import com.ptc.wfc.wfcModel.*;
import com.ptc.wfc.wfcGeometry.*;
import com.ptc.wfc.wfcSolid.*;
import com.ptc.wfc.wfcPart.*;
import com.ptc.pfc.pfcPart.*;
import com.ptc.pfc.pfcDimension.*;
import com.ptc.pfc.pfcAssembly.*;
import com.ptc.pfc.pfcSelect.*;
import com.ptc.pfc.pfcUnits.*;
import com.ptc.pfc.pfcObject.*;
import com.ptc.pfc.pfcUI.*;
import com.ptc.pfc.pfcRelations.*;
import com.ptc.pfc.pfcDetail.*;
import com.ptc.pfc.pfcDrawing.*;
import com.ptc.pfc.pfcView.*;
import com.ptc.pfc.pfcView2D.*;
import com.ptc.pfc.pfcModel2D.*;

class SurfaceDescsInterfaceImport
{

	public SurfaceDescsInterfaceImport()
	{
	}

	public static WSurfaceDescriptors OtkUtilSurfaceDescriptorCreate()
	{
		try
		{
 		WSurfaceDescriptors wSurfDescs = WSurfaceDescriptors.create();
		int[] nums;

		ContourDescriptors WSContDescs1 = ContourDescriptors.create();
		intseq WSEdgeIds1 = intseq.create();

		nums = new int [4];
		nums[0] = 52;
		nums[1] = 53;
		nums[2] = 54;
		nums[3] = 55;
		otkCreateIntfDataUtils.CreateEdgeIdArray(WSEdgeIds1, 4, nums);
		ContourDescriptor WSContDesc1 = wfcGeometry.ContourDescriptor_Create(ContourTraversal.CONTOUR_TRAV_EXTERNAL, WSEdgeIds1);
		WSContDescs1.append(WSContDesc1);

		// SURFACE_PLANE
		Vector3D  WSXAxis1 = otkCreateIntfDataUtils.CreatePfcVector3D ( 1.0 , 0.0 , 0.0 );
		Vector3D  WSYAxis1 = otkCreateIntfDataUtils.CreatePfcVector3D ( 0.0 , 1.0 , 0.0 );
		Vector3D  WSZAxis1 = otkCreateIntfDataUtils.CreatePfcVector3D ( 0.0 , 0.0 , 1.0 );
		Point3D  WSorigin1 = otkCreateIntfDataUtils.CreatePfcPoint3D( 0.0 , 0.0 , 0.0 );
		Matrix3D  WSMatrixD1 = otkCreateIntfDataUtils.CreatePfcMatrix3D(1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0); 
		Transform3D   WSTransformD1 = pfcBase.Transform3D_Create(WSMatrixD1);


		otkCreateIntfDataUtils.CreatePfcTransform3D(WSXAxis1, WSYAxis1,WSZAxis1, WSorigin1, WSTransformD1);


		UVParams  WSUVParam11 = otkCreateIntfDataUtils.CreatePfcUVParams(-5.085380937694644, -259.3544278224269);
		UVParams  WSUVParam21 = otkCreateIntfDataUtils.CreatePfcUVParams(259.3544278224269, 5.085380937694644);
		UVOutline  WSUVOutline1 = otkCreateIntfDataUtils.CreatePfcUVOutline(WSUVParam11, WSUVParam21);
		SurfaceExtents  WSSurfaceExtents1 = pfcGeometry.SurfaceExtents_Create (WSUVOutline1);
		WPlaneDescriptor  WSPlaneDesc1 = wfcGeometry.WPlaneDescriptor_Create(WSSurfaceExtents1, SurfaceOrientation.SURFACEORIENT_INWARD, WSTransformD1, 51, WSContDescs1); 

		WSurfaceDescriptor  WSSurfDesc1 = (WSurfaceDescriptor)(WSPlaneDesc1);


		wSurfDescs.append(WSSurfDesc1);


		ContourDescriptors WSContDescs2 = ContourDescriptors.create();
		intseq WSEdgeIds2 = intseq.create();

		nums = new int [4];
		nums[0] = 52;
		nums[1] = 62;
		nums[2] = 57;
		nums[3] = 64;
		otkCreateIntfDataUtils.CreateEdgeIdArray(WSEdgeIds2, 4, nums);
		ContourDescriptor WSContDesc2 = wfcGeometry.ContourDescriptor_Create(ContourTraversal.CONTOUR_TRAV_EXTERNAL, WSEdgeIds2);
		WSContDescs2.append(WSContDesc2);

		// SURFACE_PLANE
		Vector3D  WSXAxis2 = otkCreateIntfDataUtils.CreatePfcVector3D ( 0.0 , -1.0 , 0.0 );
		Vector3D  WSYAxis2 = otkCreateIntfDataUtils.CreatePfcVector3D ( 0.0 , 0.0 , 1.0 );
		Vector3D  WSZAxis2 = otkCreateIntfDataUtils.CreatePfcVector3D ( -1.0 , 0.0 , 0.0 );
		Point3D  WSorigin2 = otkCreateIntfDataUtils.CreatePfcPoint3D( 0.0 , 0.0 , 0.0 );
		Matrix3D  WSMatrixD2 = otkCreateIntfDataUtils.CreatePfcMatrix3D(0.0,-1.0,0.0,0.0,0.0,0.0,1.0,0.0,-1.0,0.0,0.0,0.0,0.0,0.0,0.0,1.0); 
		Transform3D   WSTransformD2 = pfcBase.Transform3D_Create(WSMatrixD2);


		otkCreateIntfDataUtils.CreatePfcTransform3D(WSXAxis2, WSYAxis2,WSZAxis2, WSorigin2, WSTransformD2);


		UVParams  WSUVParam12 = otkCreateIntfDataUtils.CreatePfcUVParams(-5.085380937694644, -1.0);
		UVParams  WSUVParam22 = otkCreateIntfDataUtils.CreatePfcUVParams(259.3544278224269, 51.0);
		UVOutline  WSUVOutline2 = otkCreateIntfDataUtils.CreatePfcUVOutline(WSUVParam12, WSUVParam22);
		SurfaceExtents  WSSurfaceExtents2 = pfcGeometry.SurfaceExtents_Create (WSUVOutline2);
		WPlaneDescriptor  WSPlaneDesc2 = wfcGeometry.WPlaneDescriptor_Create(WSSurfaceExtents2, SurfaceOrientation.SURFACEORIENT_OUTWARD, WSTransformD2, 61, WSContDescs2); 

		WSurfaceDescriptor  WSSurfDesc2 = (WSurfaceDescriptor)(WSPlaneDesc2);


		wSurfDescs.append(WSSurfDesc2);


		ContourDescriptors WSContDescs3 = ContourDescriptors.create();
		intseq WSEdgeIds3 = intseq.create();

		nums = new int [4];
		nums[0] = 55;
		nums[1] = 68;
		nums[2] = 60;
		nums[3] = 62;
		otkCreateIntfDataUtils.CreateEdgeIdArray(WSEdgeIds3, 4, nums);
		ContourDescriptor WSContDesc3 = wfcGeometry.ContourDescriptor_Create(ContourTraversal.CONTOUR_TRAV_EXTERNAL, WSEdgeIds3);
		WSContDescs3.append(WSContDesc3);

		// SURFACE_PLANE
		Vector3D  WSXAxis3 = otkCreateIntfDataUtils.CreatePfcVector3D ( -1.0 , 0.0 , 0.0 );
		Vector3D  WSYAxis3 = otkCreateIntfDataUtils.CreatePfcVector3D ( 0.0 , 0.0 , 1.0 );
		Vector3D  WSZAxis3 = otkCreateIntfDataUtils.CreatePfcVector3D ( 0.0 , 1.0 , 0.0 );
		Point3D  WSorigin3 = otkCreateIntfDataUtils.CreatePfcPoint3D( 254.26904688473223 , 0.0 , 0.0 );
		Matrix3D  WSMatrixD3 = otkCreateIntfDataUtils.CreatePfcMatrix3D(-1.0,0.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,1.0,0.0,0.0,254.26904688473223,0.0,0.0,1.0); 
		Transform3D   WSTransformD3 = pfcBase.Transform3D_Create(WSMatrixD3);


		otkCreateIntfDataUtils.CreatePfcTransform3D(WSXAxis3, WSYAxis3,WSZAxis3, WSorigin3, WSTransformD3);


		UVParams  WSUVParam13 = otkCreateIntfDataUtils.CreatePfcUVParams(-5.085380937694644, -1.0);
		UVParams  WSUVParam23 = otkCreateIntfDataUtils.CreatePfcUVParams(259.3544278224269, 51.0);
		UVOutline  WSUVOutline3 = otkCreateIntfDataUtils.CreatePfcUVOutline(WSUVParam13, WSUVParam23);
		SurfaceExtents  WSSurfaceExtents3 = pfcGeometry.SurfaceExtents_Create (WSUVOutline3);
		WPlaneDescriptor  WSPlaneDesc3 = wfcGeometry.WPlaneDescriptor_Create(WSSurfaceExtents3, SurfaceOrientation.SURFACEORIENT_OUTWARD, WSTransformD3, 67, WSContDescs3); 

		WSurfaceDescriptor  WSSurfDesc3 = (WSurfaceDescriptor)(WSPlaneDesc3);


		wSurfDescs.append(WSSurfDesc3);


		ContourDescriptors WSContDescs4 = ContourDescriptors.create();
		intseq WSEdgeIds4 = intseq.create();

		nums = new int [4];
		nums[0] = 54;
		nums[1] = 66;
		nums[2] = 59;
		nums[3] = 68;
		otkCreateIntfDataUtils.CreateEdgeIdArray(WSEdgeIds4, 4, nums);
		ContourDescriptor WSContDesc4 = wfcGeometry.ContourDescriptor_Create(ContourTraversal.CONTOUR_TRAV_EXTERNAL, WSEdgeIds4);
		WSContDescs4.append(WSContDesc4);

		// SURFACE_PLANE
		Vector3D  WSXAxis4 = otkCreateIntfDataUtils.CreatePfcVector3D ( 0.0 , 1.0 , 0.0 );
		Vector3D  WSYAxis4 = otkCreateIntfDataUtils.CreatePfcVector3D ( 0.0 , 0.0 , 1.0 );
		Vector3D  WSZAxis4 = otkCreateIntfDataUtils.CreatePfcVector3D ( 1.0 , 0.0 , 0.0 );
		Point3D  WSorigin4 = otkCreateIntfDataUtils.CreatePfcPoint3D( 254.26904688473223 , -254.26904688473223 , 0.0 );
		Matrix3D  WSMatrixD4 = otkCreateIntfDataUtils.CreatePfcMatrix3D(0.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0,1.0,0.0,0.0,0.0,254.26904688473223,-254.26904688473223,0.0,1.0); 
		Transform3D   WSTransformD4 = pfcBase.Transform3D_Create(WSMatrixD4);


		otkCreateIntfDataUtils.CreatePfcTransform3D(WSXAxis4, WSYAxis4,WSZAxis4, WSorigin4, WSTransformD4);


		UVParams  WSUVParam14 = otkCreateIntfDataUtils.CreatePfcUVParams(-5.085380937694644, -1.0);
		UVParams  WSUVParam24 = otkCreateIntfDataUtils.CreatePfcUVParams(259.3544278224269, 51.0);
		UVOutline  WSUVOutline4 = otkCreateIntfDataUtils.CreatePfcUVOutline(WSUVParam14, WSUVParam24);
		SurfaceExtents  WSSurfaceExtents4 = pfcGeometry.SurfaceExtents_Create (WSUVOutline4);
		WPlaneDescriptor  WSPlaneDesc4 = wfcGeometry.WPlaneDescriptor_Create(WSSurfaceExtents4, SurfaceOrientation.SURFACEORIENT_OUTWARD, WSTransformD4, 65, WSContDescs4); 

		WSurfaceDescriptor  WSSurfDesc4 = (WSurfaceDescriptor)(WSPlaneDesc4);


		wSurfDescs.append(WSSurfDesc4);


		ContourDescriptors WSContDescs5 = ContourDescriptors.create();
		intseq WSEdgeIds5 = intseq.create();

		nums = new int [4];
		nums[0] = 53;
		nums[1] = 64;
		nums[2] = 58;
		nums[3] = 66;
		otkCreateIntfDataUtils.CreateEdgeIdArray(WSEdgeIds5, 4, nums);
		ContourDescriptor WSContDesc5 = wfcGeometry.ContourDescriptor_Create(ContourTraversal.CONTOUR_TRAV_EXTERNAL, WSEdgeIds5);
		WSContDescs5.append(WSContDesc5);

		// SURFACE_PLANE
		Vector3D  WSXAxis5 = otkCreateIntfDataUtils.CreatePfcVector3D ( 1.0 , 0.0 , 0.0 );
		Vector3D  WSYAxis5 = otkCreateIntfDataUtils.CreatePfcVector3D ( 0.0 , 0.0 , 1.0 );
		Vector3D  WSZAxis5 = otkCreateIntfDataUtils.CreatePfcVector3D ( 0.0 , -1.0 , 0.0 );
		Point3D  WSorigin5 = otkCreateIntfDataUtils.CreatePfcPoint3D( 0.0 , -254.26904688473223 , 0.0 );
		Matrix3D  WSMatrixD5 = otkCreateIntfDataUtils.CreatePfcMatrix3D(1.0,0.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,-1.0,0.0,0.0,0.0,-254.26904688473223,0.0,1.0); 
		Transform3D   WSTransformD5 = pfcBase.Transform3D_Create(WSMatrixD5);


		otkCreateIntfDataUtils.CreatePfcTransform3D(WSXAxis5, WSYAxis5,WSZAxis5, WSorigin5, WSTransformD5);


		UVParams  WSUVParam15 = otkCreateIntfDataUtils.CreatePfcUVParams(-5.085380937694644, -1.0);
		UVParams  WSUVParam25 = otkCreateIntfDataUtils.CreatePfcUVParams(259.3544278224269, 51.0);
		UVOutline  WSUVOutline5 = otkCreateIntfDataUtils.CreatePfcUVOutline(WSUVParam15, WSUVParam25);
		SurfaceExtents  WSSurfaceExtents5 = pfcGeometry.SurfaceExtents_Create (WSUVOutline5);
		WPlaneDescriptor  WSPlaneDesc5 = wfcGeometry.WPlaneDescriptor_Create(WSSurfaceExtents5, SurfaceOrientation.SURFACEORIENT_OUTWARD, WSTransformD5, 63, WSContDescs5); 

		WSurfaceDescriptor  WSSurfDesc5 = (WSurfaceDescriptor)(WSPlaneDesc5);


		wSurfDescs.append(WSSurfDesc5);


		ContourDescriptors WSContDescs6 = ContourDescriptors.create();
		intseq WSEdgeIds6 = intseq.create();

		nums = new int [4];
		nums[0] = 57;
		nums[1] = 60;
		nums[2] = 59;
		nums[3] = 58;
		otkCreateIntfDataUtils.CreateEdgeIdArray(WSEdgeIds6, 4, nums);
		ContourDescriptor WSContDesc6 = wfcGeometry.ContourDescriptor_Create(ContourTraversal.CONTOUR_TRAV_EXTERNAL, WSEdgeIds6);
		WSContDescs6.append(WSContDesc6);

		// SURFACE_PLANE
		Vector3D  WSXAxis6 = otkCreateIntfDataUtils.CreatePfcVector3D ( 1.0 , 0.0 , 0.0 );
		Vector3D  WSYAxis6 = otkCreateIntfDataUtils.CreatePfcVector3D ( 0.0 , 1.0 , 0.0 );
		Vector3D  WSZAxis6 = otkCreateIntfDataUtils.CreatePfcVector3D ( 0.0 , 0.0 , 1.0 );
		Point3D  WSorigin6 = otkCreateIntfDataUtils.CreatePfcPoint3D( 0.0 , 0.0 , 50.0 );
		Matrix3D  WSMatrixD6 = otkCreateIntfDataUtils.CreatePfcMatrix3D(1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,50.0,1.0); 
		Transform3D   WSTransformD6 = pfcBase.Transform3D_Create(WSMatrixD6);


		otkCreateIntfDataUtils.CreatePfcTransform3D(WSXAxis6, WSYAxis6,WSZAxis6, WSorigin6, WSTransformD6);


		UVParams  WSUVParam16 = otkCreateIntfDataUtils.CreatePfcUVParams(-5.085380937694644, -259.3544278224269);
		UVParams  WSUVParam26 = otkCreateIntfDataUtils.CreatePfcUVParams(259.3544278224269, 5.085380937694644);
		UVOutline  WSUVOutline6 = otkCreateIntfDataUtils.CreatePfcUVOutline(WSUVParam16, WSUVParam26);
		SurfaceExtents  WSSurfaceExtents6 = pfcGeometry.SurfaceExtents_Create (WSUVOutline6);
		WPlaneDescriptor  WSPlaneDesc6 = wfcGeometry.WPlaneDescriptor_Create(WSSurfaceExtents6, SurfaceOrientation.SURFACEORIENT_OUTWARD, WSTransformD6, 56, WSContDescs6); 

		WSurfaceDescriptor  WSSurfDesc6 = (WSurfaceDescriptor)(WSPlaneDesc6);


		wSurfDescs.append(WSSurfDesc6);

		return(wSurfDescs);

		}
		catch (Exception e)
		{
		System.out.println(e);
		}
		return null;
	}
};
